<?php
// no direct access
$drawerId = 'jv_drawer'.$module->id;
defined('_JEXEC') or die('Restricted access');
//$test = '#'.$drawerId.' li';
$drawerItem = "#jv_drawer".$module->id." li.item";
?>
<script type="text/javascript">
window.addEvent('domready',function(){
    var drawer = new JVDrawer(
    { 
      'isstyle':'default_v',     
      'otheritem':'<?php echo $item_minimized;?>',      
      'draweritem':'<?php echo $drawerItem; ?>',
      'itemshift':'<?php echo $item_shift; ?>',
      'eventtype':'<?echo $eventType; ?>'    
})
})
</script>
<div style="display: none;">Developed by <a href="http://www.joomvision.com" title="Joomla Templates, Joomla Extentions">JoomVision.com</a></div>
<?php if($moduleWidth !=0) { ?>
<div class="default-v" style="<?php echo $cssModuleWidth; ?>">
<?php } else { ?>
    <div class="default-v">
<?php } ?>
<div id="<?php echo $moduleId; ?>" class="jv-drawer <?php echo $style ?>" style="position:relative;">
    <?php if($title != ''){ ?>   
		<span class="header-l">
			<span class="header-r">
				<span class="header-m"><?php echo $title ?></span>
			</span>
		</span>
	<?php } else { ?>
	    <div class="title-l">                   
                   <div class="title-r">
                   <div class="title-b">
                    </div>
            </div>
           </div> 
	<?php } ?>	
		<ul class="list" id="<?php echo $drawerId; ?>" style='<?php echo $css_module_height;?>'>		
		  <?php for($i=0;$i<$items;$i++){
		  	$listitem = $lists[$i];
            $item_class = "item item" . ($i + 1);
            if ($i == 0) $item_class .= " first active";
            if ($i == $items - 1) $item_class .= " last";
            $item_style = "position: absolute; top: " . ($item_minimized * $i) . "px; z-index: " . ($items - $i) . ";";
		   ?>
		   <li class="<?php echo $item_class; ?>" style="<?php echo $item_style; ?>">
		   <div class="item-bg <?if($i==0) echo 'bg-first'; ?>">
                    <div class="item-m" style="<?echo $css_item_height; ?>">                                                     	
                       <div class="article">
                        <?php 
                        $renderItem = modJvDrawer::renderContentArticle($listitem,$params,$access); 
                        echo $renderItem;
                        ?>                       
                       </div>
                    </div>
            </div>
		   <div class="item-bl">
                    <div class="item-br">
                        <div class="item-b">
                    </div>
            </div>
           </div>
           </li>     
		  <?php } ?>
		</ul>
</div>
</div>
